package com.provider.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.provider.dao.TProductDemandPoolDao;
import com.provider.entity.TProductDemandPool;
import com.provider.service.TProductDemandPoolService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 项目需求池(TProductDemandPool)表服务实现类
 *
 * @author makejava
 * @since 2024-04-28 10:32:32
 */
@Service("tProductDemandPoolService")
@Transactional(rollbackFor = Exception.class)
public class TProductDemandPoolServiceImpl extends ServiceImpl<TProductDemandPoolDao, TProductDemandPool> implements TProductDemandPoolService {
    public List<TProductDemandPool> queryAllProductDemand() {
        return list();
    }

    @Override
    public List<TProductDemandPool> queryProductDemandByProductId(String productId) {
        LambdaQueryWrapper<TProductDemandPool> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(TProductDemandPool::getProductId, productId);
        return this.list(lambdaQueryWrapper);

    }
}

